﻿<!--
  
   EditorApp.xaml
  
   Copyright (c) 2007 Mike Strobel
  
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<Application x:Class="Supremacy.Editor.EditorApp"
             xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:dc="clr-namespace:DevComponents.WpfRibbon;assembly=DevComponents.WpfRibbon"
             xmlns:dd="clr-namespace:DevComponents.WpfDock;assembly=DevComponents.WpfDock"
             xmlns:se="clr-namespace:Supremacy.Editor"
             xmlns:s="clr-namespace:Supremacy.Client;assembly=SupremacyWPF"
             xmlns:tech="clr-namespace:Supremacy.Tech;assembly=SupremacyCore"
             xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
             ShutdownMode="OnMainWindowClose"
             StartupUri="EditorWindow.xaml">
  <Application.Resources>
    <ResourceDictionary>
      <Style TargetType="{x:Type dc:Ribbon}"
             BasedOn="{StaticResource {x:Type dc:Ribbon}}">
        <Setter Property="TextBlock.FontFamily"
                Value="/Resources/#Segoe UI" />
      </Style>
      <Style TargetType="{x:Type TextBlock}"
             BasedOn="{StaticResource {x:Type TextBlock}}">
        <Setter Property="TextBlock.FontFamily"
                Value="/Resources/#Segoe UI" />
      </Style>
      <FontFamily x:Key="{x:Static SystemFonts.MessageFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <FontFamily x:Key="{x:Static SystemFonts.CaptionFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <FontFamily x:Key="{x:Static SystemFonts.SmallCaptionFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <FontFamily x:Key="{x:Static SystemFonts.IconFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <FontFamily x:Key="{x:Static SystemFonts.MenuFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <FontFamily x:Key="{x:Static SystemFonts.StatusFontFamilyKey}">/Resources/#Segoe UI</FontFamily>
      <se:StringTableKeyToNameConverter x:Key="StringTableKeyToNameConverter" />
      <s:UpperCaseConverter x:Key="UpperCaseConverter" />
      <s:TechObjectImageConverter x:Key="TechObjectImageConverter" />
      <s:CivInsigniaConverter x:Key="CivInsigniaConverter" />
      <s:BonusConverter x:Key="BonusConverter" />
      <s:ResourceStringConverter x:Key="ResourceStringConverter" />
      <s:MoraleConverter x:Key="MoraleConverter" />
      <s:MoraleBrushConverter x:Key="MoraleBrushConverter" />
      <s:NetValueBrushConverter x:Key="NetValueBrushConverter" />
      <s:NetValueConverter x:Key="NetValueConverter" />
      <s:StringResourceConverter x:Key="StringResourceConverter" />
      <s:BuildQueueItemDescriptionConverter x:Key="BuildQueueItemDescriptionConverter" />
      <s:SectorNameConverter x:Key="SectorNameConverter" />
      <s:BuildRestrictionConverter x:Key="BuildRestrictionConverter" />
      <s:ResearchFieldImageConverter x:Key="ResearchFieldImageConverter" />
      <s:ResearchFieldDistributionBindingConverter x:Key="ResearchFieldDistributionBindingConverter" />
      <s:EnumStringConverter x:Key="EnumStringConverter" />
      <s:AltEnumStringConverter x:Key="AltEnumStringConverter" />
      <s:EnumValueCollectionConverter x:Key="EnumValueCollectionConverter" />
      <s:CivImageConverter x:Key="CivImageConverter" />
      <s:EncyclopediaImageConverter x:Key="EncyclopediaImageConverter" />
      <s:BonusDescriptionConverter x:Key="BonusDescriptionConverter" />
      <s:BonusTypeConverter x:Key="BonusTypeConverter" />
      <s:PlanetTypeAbbreviationConverter x:Key="PlanetTypeAbbreviationConverter" />

      <DataTemplate x:Key="TechObjectNameTemplate"
                    DataType="{x:Type tech:TechObjectDesign}">
        <TextBlock Text="{Binding Path=Name, Converter={StaticResource StringTableKeyToNameConverter}}"
                   TextTrimming="CharacterEllipsis" />
      </DataTemplate>

      <Style TargetType="{x:Type TextBox}">
        <Style.Triggers>
          <Trigger Property="Validation.HasError"
                   Value="True">
            <Setter Property="BorderBrush"
                    Value="Red" />
            <Setter Property="BorderThickness"
                    Value="2pt" />
          </Trigger>
        </Style.Triggers>
      </Style>

      <Style TargetType="{x:Type dc:SuperToolTip}">
        <Setter Property="MaxWidth"
                Value="240" />
      </Style>
      <Style x:Key="AppMenuCommandButton"
             TargetType="{x:Type dc:ButtonDropDown}">
        <Setter Property="Padding"
                Value="4,2,4,2" />
      </Style>
      <Style x:Key="AppMenuSeparator"
             TargetType="{x:Type Separator}">
        <Setter Property="Margin"
                Value="40,0,0,0" />
      </Style>
      <Style TargetType="{x:Type dc:RibbonBarPanel}">
        <Setter Property="Height"
                Value="89" />
      </Style>
      <Style TargetType="{x:Type dc:RibbonBar}">
        <Setter Property="Height"
                Value="85" />
        <Setter Property="Padding"
                Value="3" />
      </Style>

    </ResourceDictionary>
  </Application.Resources>
</Application>
